

// see http://vuejs-templates.github.io/webpack for documentation.
let path = require('path');

let env = process.env.NODE_ENV;

let publicPath = {
    dev: '/',
    test: '/',
    demo:'/',
    // production: 'http://image.lex.lenovo.com.cn/operation/',
    production: '/',
};
console.log('构建环境输出:');
console.log(publicPath[env], env);
module.exports = {
    build: {
        env: require('./prod.env'),
        index: path.resolve(__dirname, '../dist/index.html'),
        assetsRoot: path.resolve(__dirname, '../dist'),
        assetsSubDirectory: 'static',
        assetsPublicPath: publicPath[env],
        productionSourceMap: true,
        productionGzip: false,
        productionGzipExtensions: ['js', 'css'],
        bundleAnalyzerReport: process.env.npm_config_report
    },
    dev: {
        env: require('./dev.env'),
        port: 8080,
        autoOpenBrowser: true,
        assetsSubDirectory: 'static',
        assetsPublicPath: '/',
        proxyTable: {
            '/back': {
                 //target: "https://gamecent-dev.vgs.lenovo.com.cn", //测试地址
                target: "https://gamecent.vgs.lenovo.com.cn", //正式地址
                 //target: 'http://39.106.37.236:8180/',
                /*pathRewrite: {
                    '/back': ''
                },*/
                changeOrigin: true
            },

            '/gift': {
                 target: "https://gamecent-dev.vgs.lenovo.com.cn/back/game", //测试地址
                //target: "https://gamecent.vgs.lenovo.com.cn", //正式地址
                 //target: 'http://39.106.37.236:8180/',
                pathRewrite: {
                    '/gift': ''
                },

                changeOrigin: true
            },
            '/token': {
                 target: "https://pitf-dev.vgs.lenovo.com.cn", //测试地址
                //target: "https://gamecent.vgs.lenovo.com.cn", //正式地址
                // target: 'http://39.106.37.236:8180/',
                pathRewrite: {
                     '/token': ''
                },
                changeOrigin: true
            },
            '/search': {
                target: "http://search.vgs.lenovo.com.cn", //测试地址
                 //target: "https://search.vgs.lenovo.com.cn", //正式地址
                // target: 'http://39.106.37.236:8180/',
                pathRewrite: {
                     '/search': ''
                },
                changeOrigin: true
            },
            '/lenovoId': {
                //target: "https://bss.vgs.lenovo.com.cn", //正式地址
                 
                target: "https://bss.vgs.lenovo.com.cn", //测试地址
                pathRewrite: {
                     '/lenovoId': ''
                },
                changeOrigin: true
            },

        },
        
        cssSourceMap: false

        //ZAgAAAAAAAGE9MTAxMjIxMjYyODUmYj0yJmM9NCZkPTE2ODYwJmU9NjhDNTZBREVCQzYzOTdEOUM0NDU3NDg4M0JEMDhGODYxJmg9MTUyNjQ3Mjg4MTc0NSZpPTMwMjQwMCZvPTYwLjI0Ny4xMDQuOTEmcD0wJnE9MCZ1c2VybmFtZT0xNTkxMDU4NjUyNCZpbD1jbtp8eJMufyeRaKgCSC2pvgo&mac=18-3D-A2-37-0F-74&sn=CND0360JXR&pctype=HP%20EliteBook%208440p#/
    }
};
